<?php 
/**
* 
*/
class ActivityController extends CController
{
	public $layout = "//layouts/userpage";
	public function actionIndex()
	{
		$dataProvider=new CActiveDataProvider('UserLogs',array(
            'pagination'=>array(
                'pageSize'=>10,
            ),
            'criteria'=>array('condition'=> "user_id =:x",'params'=>array(':x'=>Yii::app()->user->id)),
        ));
        $this->render('index',array(
            'dataProvider'=>$dataProvider,
        ));	
	}

	public function actionView($id)
	{
		$model = Inbox::model()->findByPk($id);
		if ($model->status == 0) {
			$model->status=1;
			$model->save();
		}
		$this->render('view',array('model' => $model));
	}
}

 ?>